<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>流水审核</title>
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link rel="stylesheet" href="/js/bootstrap-table/bootstrap-table-1.18.3.min.css">
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/finance/payment-record.css">
    <!--表单校验插件-->
    <link rel="stylesheet" href="/css/bootstrapValidator.min.css" />
    <link rel="stylesheet" href="/css/viewer.css">
    <link rel="stylesheet" href="/css/finance/backFlowExamine.css">
</head>
<body style="overflow-y: auto">
<div class="container-fluid">
    <div class="card m-0">
        <div class="card-header">
            <h1>修改审核</h1>
        </div>
        <div class="card-body">
            <ul class="new-tabs" id="tabsBar">
                <li class="nav-item active">
                    <a href="#wholeOrder" aria-controls="wholeOrder" role="tab" data-toggle="tab" aria-expanded="true" onclick="tabsBtn(1)">订单整单解除关联审核</a>
                </li>
                <li class="nav-item">
                    <a href="#singleOrder" aria-controls="singleOrder" role="tab" data-toggle="tab" aria-expanded="true" onclick="tabsBtn(0)">单笔流水解除关联</a>
                </li>
                <li class="nav-item" id="returnMoneyExamineTab">
                    <a href="#returnMoneyExamine" aria-controls="returnMoneyExamine" role="tab" data-toggle="tab" aria-expanded="true" onclick="tabsBtn(2)">回款审核</a>
                </li>
            </ul>
            <div class="tab-content">
                <div role="wholeOrder" class="tab-pane active" id="wholeOrder">
                    <div class="row content-action">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 " style="padding-left: 0">
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-left">
                                <div class="time-search pull-left">
                                    <input type="hidden" id="dateType" name="dateType" value="1" autocomplete="off">
                                    <div class="all active-second" onclick="selectTime('all')">全部</div>
                                    <div class="customize" onclick="selectTime('customize')">自定义</div>
                                </div>
                                <div id="timeBox1"  style="display: none">
                                    <div class="input-group pull-left" style="width: 50%;margin-left: 10px;">
                                        <input type="text" id="startTimeStr1" class="form-control daySelect" placeholder="请输入起始时间" autocomplete="off" style="height: 36px">
                                        <span class="input-group-addon">至</span>
                                        <input type="text" id="endTimeStr1" class="form-control daySelect" placeholder="请输入截止时间" autocomplete="off" style="height: 36px">
                                    </div>
                                    <button class="btn btn-default" onclick="wholeOrderTableInit()">确定</button>
                                </div>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-right">
                                <div class="pull-right">
                                    <div class="min-search pull-right" style="margin-left: 15px">
                                        <input class="form-control" type="text" placeholder="请输入订单号/流水号"
                                               id="orderNumber" name="orderNumber">
                                        <button class="btn btn-primary" type="button" onclick="wholeOrderTableInit()">
                                            <i class="mdi mdi-magnify"></i><span>搜索</span>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 ">
                            <table id="wholeOrderTable"></table>
                        </div>
                    </div>
                </div>
                <div role="singleOrder" class="tab-pane" id="singleOrder">
                    <div class="row content-action">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "  style="padding-left: 0">
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-left"  style="padding-left: 0">
                                <button class="btn btn-default pull-left" onclick="isShowTime()">自定义时间段</button>
                                <div id="timeBox" style="display: none">
                                    <div class="input-group pull-left" style="width: 50%;margin-left: 10px;">
                                        <input type="text" id="startTimeStr" class="form-control daySelect" placeholder="请输入起始时间" autocomplete="off" style="height: 36px">
                                        <span class="input-group-addon">至</span>
                                        <input type="text" id="endTimeStr" class="form-control daySelect" placeholder="请输入截止时间" autocomplete="off" style="height: 36px">
                                    </div>
                                    <button class="btn btn-default" onclick="bankFlowExamineInit()">确定</button>
                                </div>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-right">
                                <div class="pull-right">
                                    <div class="min-search pull-right" style="margin-left: 15px">
                                        <input class="form-control" type="text" placeholder="请输入订单号/流水号"
                                               id="orderNumberSearch" name="orderNumberSearch">
                                        <button class="btn btn-primary" type="button" onclick="bankFlowExamineInit()">
                                            <i class="mdi mdi-magnify"></i><span>搜索</span>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 ">
                            <table id="bankFlowExamine"></table>
                        </div>
                    </div>
                </div>
                <div role="returnMoneyExamine" class="tab-pane" id="returnMoneyExamine">
                    <div class="row content-action">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 " style="padding-left: 0">
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-right">
                                <div class="pull-right">
                                    <div class="min-search pull-right" style="margin-left: 15px">
                                        <input class="form-control" type="text" placeholder="请输入订单编号/订单客户名称"
                                               id="orderNumberReturnMoney" name="orderNumberReturnMoney">
                                        <button class="btn btn-primary" type="button" onclick="returnMoneyExamineTableInit()">
                                            <i class="mdi mdi-magnify"></i><span>搜索</span>
                                        </button>
                                    </div>
                                </div>
                                <div class="pull-right" style="display:flex">
                                    <!--<label class="control-label pull-left">财务审核状态:</label>-->
                                    <div class="form-content" style="width:180px">
                                        <select  class="form-control selectpicker" id='financeExamineState' type="text" placeholder="请选择财务审核状态" onchange="returnMoneyExamineTableInit()">
                                            <option value="">请选择财务审核状态</option>
                                            <option value="0">正在审核</option>
                                            <option value="1">审核通过</option>
                                            <option value="2">审核未通过</option>
                                            <option value="3">补充材料</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 ">
                            <table id="returnMoneyExamineTable"></table>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<!-- 充值码订单详情 -->
<div class="modal fade" tabindex="-1" role="dialog" id="orderDetails">
    <input type="text" id="examineId" hidden="hidden">
    <div class="modal-dialog" role="document" style="width: 60%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>订单详情 <span style="font-size: 14px;color: #AEB6C2">（ 充值码 ：<i style="font-style: normal;" id="payNumber"></i> ）</span></h4>
            </div>
            <div class="modal-body" style="padding-bottom: 18px;">
                <div class="centerContantTwo well">
                    <table>
                        <tr>
                            <td>
                                <div class="details_title">付款单位：</div>
                                <div class="details_text" id="paymentUnit"></div>
                            </td>
                            <td>
                                <div class="details_title">到款日期：</div>
                                <div class="details_text" id="paymentDate"></div>
                            </td>
                            <td>
                                <div class="details_title">到款方式：</div>
                                <div class="details_text" id="arriveMethod"></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="details_title">到款金额：</div>
                                <div class="details_text" id="payMoney"></div>
                            </td>
                            <td>
                                <div class="details_title">付款账号：</div>
                                <div class="details_text" id="paymentAccount"></div>
                            </td>
                            <td>
                                <div class="details_title">付款银行：</div>
                                <div class="details_text" id="paymentBank"></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="details_title">流水号：</div>
                                <div class="details_text" id="transactionNo"></div>
                            </td>
                            <td>
                                <div class="details_title">到款单位名称：</div>
                                <div class="details_text" id="arriveUnitName"></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="details_title">备注：</div>
                                <div class="details_text" id="remark"></div>
                            </td>
                        </tr>
                    </table>
            </div>
            <div class="clearfix" style="width: 100%">
                <div class="pull-left" style="width: 49%">
                    <p class="label-required">解除关联备注</p>
                    <textarea id="relationReason" type="text" disabled class="form-control textarea" style="height: 100px;" maxlength="300" ></textarea>
                </div>
                <div class="pull-right"  style="width: 50%;margin-left: 1%">
                    <p class="label-required">审核原因</p>
                    <textarea id="removeNote" type="text" class="form-control textarea" style="height: 100px" maxlength="300" ></textarea>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="reviewButton(1)">同意解除关联</button>
                <!--                onclick="hideInput()"-->
                <button type="button" class="btn btn-default" onclick="reviewButton(2)">不允许解除关联</button>
            </div>
        </div>

    </div>
</div>
</div>
<!--回款审核-->
<div class="modal fade" tabindex="-1" role="dialog" id="approvalModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header" style="padding:15px 30px">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <header>
                    不一致性审核
                    <span>(订单编号:<span id="orderNumberApprovl"></span>)</span>
                </header>
            </div>
            <div class="modal-body clearFix" style="min-height: 200px;">
                <main id="exchangeApproval" class="clearFix">
                    <div>
                        <form class="form-horizontal clearFix bgForm">
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">流水客户名称:</label>
                                <div class="form-content">
                                    <span id="flowCustomerName"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">当前流水客户名称所有人:</label>
                                <div class="form-content">
                                    <span id="flowCreatePeopleName"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">流水号:</label>
                                <div class="form-content">
                                    <span id="serial"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">流水金额:</label>
                                <div class="form-content">
                                    <span id="arriveMoney"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">订单客户名称:</label>
                                <div class="form-content">
                                    <span id="orderCustomerName"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">当前订单所有人:</label>
                                <div class="form-content">
                                    <span id="orderCreatePeopleName"></span>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">客服证明材料:</label>
                                <div class="form-content">
                                    <a href="javascript:;" style="line-height:36px;margin-left:5px;" onclick="showFile(0);">查看</a>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <label class="control-label pull-left">财务证明材料:</label>
                                <div class="form-content">
                                    <a href="javascript:;" style="line-height:36px;margin-left:5px;" onclick="showFile(1);">查看</a>
                                </div>
                            </div>
                        </form>
                        <form class="form-horizontal clearFix" style="margin-top:10px">
                            <div class="form-group clearFix col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-bottom:0">
                                <label class="control-label" style="font-weight: bold;font-size:16px">订单详情:</label>
                            </div>
                        </form>
                        <form class="form-horizontal clearFix bgForm">
                            <div class="form-group clearFix col-lg-12 col-md-12 col-sm-12 col-xs-12" id="exchangeTableContainer">
                                <!--<label class="control-label" style="font-weight: bold;font-size:16px">订单详情:</label>-->
                                <div class="form-content">
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">合同类型:</label>
                                        <div class="form-content">
                                            <span id="contractType"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">合同起止日期:</label>
                                        <div class="form-content">
                                            <span id="contractRange"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">合作开发人员:</label>
                                        <div class="form-content">
                                            <a href="#!" data-toggle="modal" data-target="#cooperateModal" style="position:relative;top: 6px;margin-left:5px;">查看</a>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">合同编号:</label>
                                        <div class="form-content">
                                            <span id="contractNumber"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">订单状态:</label>
                                        <div class="form-content">
                                            <span id="orderStatus"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">订单所有人:</label>
                                        <div class="form-content">
                                            <span id="createPeopleName"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">订单创建时间:</label>
                                        <div class="form-content">
                                            <span id="orderCreateTm"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">所属分公司:</label>
                                        <div class="form-content">
                                            <span id="orderCompanyName"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">客户名称:</label>
                                        <div class="form-content">
                                            <span id="orderCustomerName2"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">订单总金额:</label>
                                        <div class="form-content">
                                            <span id="orderActualTotalAmount"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">当前回款:</label>
                                        <div class="form-content">
                                            <span id="returnMoneyAmount"></span>
                                        </div>
                                    </div>
                                    <div class="form-group clearFix col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                        <label class="control-label pull-left">订单尾款:</label>
                                        <div class="form-content">
                                            <span id="residueMoneyAmount"></span>
                                        </div>
                                    </div>

                                </div>
                            </div>
                         </form>
                        <form class="form-horizontal clearFix" id="approvalForm">
                            <div class="form-group clearFix col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                <label class="control-label pull-left">审核记录:</label>
                                <div class="form-content" style="width: calc(100% + 30px);">
                                    <table id="approvalRecord"></table>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-12 col-md-12 col-sm-12 col-xs-12 approvalDemo">
                                <label class="control-label pull-left label-required">财务审核备注:</label>
                                <div class="form-content">
                                    <textarea id="financeExamineRemark" name="financeExamineRemark" class="form-control" rows="5" placeholder="请输入备注"></textarea>
                                </div>
                            </div>
                            <div class="form-group clearFix col-lg-12 col-md-12 col-sm-12 col-xs-12 approvalDemo">
                                <label class="control-label pull-left label-required">财务审核结果:</label>
                                <div class="form-content" style="display: flex;line-height: 36px;" id="financeExamineContainer">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div id='btnsContainer' class="card-body pull-right">
                        <div class="btn btn-default" data-dismiss="modal">取消</div>
                        <div class="btn btn-primary"style="margin-left: 20px;" onclick="submitApproval()">确定</div>
                    </div>
                </main>

            </div>
        </div>
    </div>
</div>
<!-- 合作开发人员列表 -->
<div class="modal fade" tabindex="-1" role="dialog" id="cooperateModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>合作开发人员</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 18px;">
                <table id="cooperateTable"></table>
            </div>
        </div>
    </div>
</div>
<!-- 附件预览 -->
<div class="modal fade bs-example-modal-lg fileModal" tabindex="-1" role="dialog" id="fileModal">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>附件预览</h4>
            </div>
            <div class="modal-body">
                <iframe src="" frameborder="0" id="fileIframe"></iframe>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min-1.18.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script type="text/javascript" src="/js/crm/common/common.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns-1.18.3.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--图片查看-->
<script type="text/javascript" src="/js/viewer.js"></script>
<script type="text/javascript" src="/js/jquery-viewer.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!--表单校验-->
<script type="text/javascript" src="/js/bootstrapValidator.min.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/finance/bankFlowExamine.js"></script>
</body>
</html>